fix: gt done blocked by runtime dirs after MQ submit + push timeout#3462
Open
Cdfghglz wants to merge 1 commit intogastownhall:mainfrom
Open
fix: gt done blocked by runtime dirs after MQ submit + push timeout#3462Cdfghglz wants to merge 1 commit intogastownhall:mainfrom
Cdfghglz wants to merge 1 commit intogastownhall:mainfrom
Conversation
Two bugs in gt done that block polecat completion: 1. CleanExcludingRuntime() rejected when UnpushedCommits > 0, but after MQ submit commits are on the polecat branch (not main) — expected. The function's job is to check if *file-level* changes are all runtime artifacts (.beads/, .claude/, .runtime/). Unpushed commits and stashes are orthogonal concerns. Removed those checks. 2. All git push operations (Push, PushWithEnv, DeleteRemoteBranch, PushSubmoduleCommit) ran with no timeout. When GitLab is unreachable, gt done hangs indefinitely. Added 60s timeout via context.WithTimeout to all push paths. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #3461
UnpushedCommitsorStashCount. These are orthogonal to file-level runtime artifact filtering. After MQ submit, commits exist on the polecat branch (not main) — this is expected and should not block completion. Stashes survive worktree deletion.Push,PushWithEnv,DeleteRemoteBranch,PushSubmoduleCommit) now use a 60-second timeout viacontext.WithTimeout. When the remote is unreachable,gt donefails cleanly instead of hanging indefinitely.Changes
git.go: AddedrunWithTimeout(),runWithEnvAndTimeout(), andpushTimeoutconstant (60s)git.go:Push(),PushWithEnv(),DeleteRemoteBranch()use timeout-aware runnersgit.go:PushSubmoduleCommit()usesexec.CommandContextwith timeoutgit.go:CleanExcludingRuntime()only checks file paths, not commit/stash stategit_test.go: Updated test expectations to match new behaviorTest plan
go build ./...passesgo test ./internal/git/...passes — allTestCleanExcludingRuntimeandTestIsGasTownRuntimePathcases greengt donein polecat with.beads/,.claude/,.runtime/untracked + MQ-submitted commits → completes successfullygt donewith unreachable remote → fails with timeout error after 60s instead of hanging🤖 Generated with Claude Code